package com.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.reggie.annotation.AutoFill;
import com.reggie.constant.AutoFillConstant;
import com.reggie.context.BaseContext;
import com.reggie.dto.EmployeePageQueryDTO;
import com.reggie.entity.Employee;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface EmployeeMapper extends BaseMapper<Employee> {


    /**
     * 员工登录
     * */
     Employee findByUsername(String username);

     /**
      * 员工注册
      * */
     @AutoFill(type = AutoFillConstant.INSERT)
    void reg(Employee employee);

    /**
     * 分页查询
     * */
    Page<Employee> pageQuery(EmployeePageQueryDTO employeePageQueryDTO);

    /**
     * 修改员工状态
     * */
    void startOrStop(Integer status, Long id);
}
